<?php slot('title',sprintf('TOYOMOTOR - Registro'));?>

<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('usuarios/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_usuario='.$form->getObject()->getIdUsuario() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
    <?php echo $form->renderHiddenFields(false) ?>

 <?php echo $form->renderGlobalErrors() ?>      
<span class="campo-form"><span class="red">*</span> <?php echo $form['nombre']->renderLabel() ?><?php echo $form['nombre']->renderError() ?>
          <?php echo $form['nombre'] ?></span>

<span class="campo-form"><span class="red">*</span> <?php echo $form['apellido']->renderLabel() ?>  <?php echo $form['apellido']->renderError() ?>
          <?php echo $form['apellido'] ?></span>
         
<span class="campo-form"><span class="red">*</span> <?php echo $form['password']->renderLabel() ?> <?php echo $form['password']->renderError() ?>
          <?php echo $form['password'] ?></span>
          <span class="ejemplo">Ejm. Solo letras y numeros</span>
          
<span class="campo-form"><span class="red">*</span> <?php echo $form['email']->renderLabel() ?> <?php echo $form['email']->renderError() ?>
          <?php echo $form['email'] ?></span>
          <span class="ejemplo">Ejm. xxx@xxx.xxx</span>

<span class="campo-form"><span class="red">*</span> Repetir Email:<input type="email" name="repetir_mail" id="usuario_email_repeat" maxlength="70" /></span>
<span class="ejemplo">Ejm. mismo email anterior</span>
<span class="campo-form"><span class="red">*</span> <?php echo $form['celular1']->renderLabel() ?><?php echo $form['celular1']->renderError() ?>
          <?php echo $form['codigoc']->renderError() ?><?php echo $form['celular1'] ?><?php echo $form['codigoc'] ?></span>
          <span class="ejemplo">Ejm. 04xx xxxxxxx</span>
          
<span class="campo-form"><?php echo $form['telefono1']->renderLabel() ?>  <?php echo $form['codigot']->renderError() ?><?php echo $form['telefono1']->renderError() ?>
          <?php echo $form['telefono1'] ?><?php echo $form['codigot'] ?></span>
<span class="ejemplo">Ejm. 0212 11155566</span>
<span class="campo-form"><span class="red">*</span> <?php echo $form['Ciudad']->renderLabel() ?>  <?php echo $form['Ciudad']->renderError() ?>
          <?php echo $form['Ciudad'] ?></span>
<span class="ejemplo">Caracas</span>

<span class="campo-form"><span class="red">*</span> <?php echo $form['Zona']->renderLabel() ?>  <?php echo $form['Zona']->renderError() ?>
          <?php echo $form['Zona'] ?></span>
<span class="ejemplo">Ejm. El Paraiso</span>
<span class="campo-form"><?php echo $form['recibir_info']->renderLabel() ?> <?php echo $form['recibir_info']->renderError() ?>
          <?php echo $form['recibir_info'] ?></span>
          
              <input type="hidden" name="registro" value="1" />
      <?php if ($sf_user->isAuthenticated()) :  ?>
      <?php if ($sf_user->hasCredential('Usuario')) : ?><input type="hidden" name="usuario[perfil]" id="usuario_perfil" value="3" /><?php endif; ?>
      <?php if ($sf_user->hasCredential('Asesor')) : ?><input type="hidden" name="usuario[perfil]" id="usuario_perfil" value="2" /><?php endif; ?>
      <?php if ($sf_user->hasCredential('Admin')) : ?><input type="hidden" name="usuario[perfil]" id="usuario_perfil" value="1" /><?php endif; ?>
      <?php else :  ?>
        <input type="hidden" name="usuario[perfil]" id="usuario_perfil" value="3" />
      <?php endif; ?>
      <span class="datos-obligados"><span class="red">*</span> Datos Obligatorios</span>
           <input type="submit" value="Aceptar" class="button-enviar" onclick="return verificarRegistro(this.form);" />
</form>
<div id="space"></div>